package com.inno.subject.domain.strategy.ai;

import com.inno.subject.common.enums.MockTypeEnum;
import com.inno.subject.domain.entity.InterviewBO;
import com.inno.subject.domain.utils.ApplicationContextUtil;
import com.inno.subject.domain.utils.ChatClientUtil;
import com.inno.subject.domain.websocket.SubjectSocket;
import jakarta.annotation.Resource;
import jakarta.websocket.Session;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;

import java.util.Objects;

/**
 * 技术面试 项目专项
 */
@Slf4j
@Component
public class ProjectHandler implements InterviewMockHandler {
    @Resource
    private ChatClientUtil chatClientUtil;
    @Resource
    private ThreadPoolTaskExecutor subjectExecutor;

    @Override
    public String getType() {
        return MockTypeEnum.PROJECT.getType();
    }

    private static final String PROJECT_QUESTION = "你是某公司的技术总监，我现在来面试你们公司了，接下来我会将我简历的内容发给你，或我会说出我的情况，你今天负责的是技术面试中的项目场景题，您只需要提问，由我来回答问题，您只需要判断我的回答是否正确，如果正确您再提问下一题，您每次提问一道题或二道题即可，并且当我问您今天的面试结果是否通过的时候，您需要根据我所答问题的表现，来判断是否可以通过。现在，让我们开始面试吧:\t\t";

    @Override
    public void handle(InterviewBO interviewBO) {
        String keyword = MockTypeEnum.PROJECT.getKeyword();
        subjectExecutor.submit(()-> this.start(interviewBO,keyword,chatClientUtil,PROJECT_QUESTION));



    }
}
